import emitter from '@/render/utils/mitt'

interface IMenuItem {
  label: string
  click: () => void
}
interface IMenuSperator {
  type: 'separator'
}

type IMenuTemplate = IMenuItem | IMenuSperator
export const moduleMenuConfig: IMenuTemplate[] = [
  {
    label: '删除该模块',
    click: (): void => {
      emitter.emit('open-delete-module', 'emitter')
    }
  },
  { type: 'separator' },
  {
    label: '驱动代码生成',
    click: (): void => {
      emitter.emit('open-generate-module-drives', 'emitter')
    }
  },
  {
    label: '参数定义文件生成',
    click: (): void => {
      emitter.emit('open-generate-module-configdef', 'emitter')
    }
  },
  {
    label: '软件包导出',
    click: (): void => {
      emitter.emit('open-generate-module', 'emitter')
    }
  }
]
